﻿using System;

namespace YXYLCommon
{
    /// <summary>
    /// 类型处理类(功能:判断某值是否为某类型,转换等)
    /// </summary>
    [Serializable]
    public class TypeDeal
    {
        #region Property



        #endregion

        #region Contructor
        public TypeDeal()
        {
        }
        #endregion

        #region Method

        public static bool IsInt(object value)
        {
            int no = 0;
            return value==null?false:int.TryParse(value.ToString(), out no);
        }

        public static bool IsDecimal(object value)
        {
            decimal no = 0;
            return value == null ? false : decimal.TryParse(value.ToString(), out no);
        }

        #endregion
    }
}

